package com.explorati.design_pattern.comparson.creational.builder;

public class SuperMan {

	private String body;
	private String specialTalent;
	private String specialSymbol;

	public SuperMan(AdultSuperManBuilder asmb) {
		this.body = asmb.body;
		this.specialTalent = asmb.specialTalent;
		this.specialSymbol = asmb.specialSymbol;
	}

	public SuperMan(ChildSuperManBuilder csmb) {
		this.body = csmb.body;
		this.specialTalent = csmb.specialTalent;
		this.specialSymbol = csmb.specialSymbol;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public String getSpecialTalent() {
		return specialTalent;
	}

	public void setSpecialTalent(String specialTalent) {
		this.specialTalent = specialTalent;
	}

	public String getSpecialSymbol() {
		return specialSymbol;
	}

	public void setSpecialSymbol(String specialSymbol) {
		this.specialSymbol = specialSymbol;
	}

	@Override
	public String toString() {
		return "SuperMan [body=" + body + ", specialTalent=" + specialTalent + ", specialSymbol=" + specialSymbol + "]";
	}

	public static class AdultSuperManBuilder {

		private String body;
		private String specialTalent;
		private String specialSymbol;

		public AdultSuperManBuilder buildBody(String body) {
			this.body = body;
			return this;
		}

		public AdultSuperManBuilder buildSpecialTalent(String talent) {
			this.specialTalent = talent;
			return this;
		}

		public AdultSuperManBuilder buildSpecialSymbol(String specialSymbol) {
			this.specialSymbol = specialSymbol;
			return this;
		}

		public SuperMan build() {
			return new SuperMan(this);
		}
	}

	public static class ChildSuperManBuilder {

		private String body;
		private String specialTalent;
		private String specialSymbol;

		public ChildSuperManBuilder buildBody(String body) {
			this.body = body;
			return this;
		}

		public ChildSuperManBuilder buildSpecialTalent(String talent) {
			this.specialTalent = talent;
			return this;
		}

		public ChildSuperManBuilder buildSpecialSymbol(String specialSymbol) {
			this.specialSymbol = specialSymbol;
			return this;
		}

		public SuperMan build() {
			return new SuperMan(this);
		}
	}
}
